﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/*********************************************************
 * 
 * programmer:		patrick.woolhoo@gmail.com
 * svn:				http://woolhoo-net.googlecode.com/svn/trunk/wnet/
 * class:			Msg
 * desc:			实现通过cookie在不同页面之间传递信息，主要实现提示功能
 * 
 * *******************************************************/
public class Msg
{
	public Msg()
	{
		//
		// TODO: 在此处添加构造函数逻辑
		//
	}

	public static void Write(string txt) {
		HttpContext.Current.Session[HttpContext.Current.Server.MapPath("~") + "_MSG"] = txt;
	}


	public static string Read() {
		return (string)HttpContext.Current.Session[HttpContext.Current.Server.MapPath("~") + "_MSG"];
	}


	public static void Clear() {
		HttpContext.Current.Session.Remove(HttpContext.Current.Server.MapPath("~") + "_MSG");
	}
}
